<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
 * Auto_field:
 * Auto-incrementing integet. Can set whether or not it's also a primary key.
 */
class Auto_field extends Integer_field
{
	public function __construct(Array $properties)
	{
		// Change Integer's defaults for the Auto field
		$this->defaults['primary_key'] = true;
		$this->defaults['auto_increment'] = true;
		$this->defaults['unsigned'] = true;
		$this->defaults['allow_null'] = false;
		
		// Extend defaults with passed-in properties
		$properties = array_merge($this->defaults, $properties);
		
		parent::__construct($properties);
	}
} // end Auto_field